#ifndef _SENSE_NODE_
#define _SENSE_NODE_

#include <stdint.h>

#define FFT_RAM_SIZE 512
#define MAX_SIGNAL_NUM 63

struct signal_in_fft_t {
    uint32_t amplitude;
    uint16_t freq_raw;
    uint16_t high_freq_raw;
};

void start_FFT_once(uint32_t level);
uint16_t *read_FFT_RAM();
uint16_t read_signal_number();
struct signal_in_fft_t *read_signal_val(uint16_t signal_num);
uint16_t get_FFT_state();
void start_DDC(uint32_t center_frequency_kHz, uint16_t band_sel, uint16_t channel);
void stop_DDC(uint16_t channel);
void store_DDC_result(uint32_t StoreLength_Ltime, uint32_t len, uint16_t channel);
int16_t wait_DDC();
void set_timestamp(uint8_t min, uint8_t sec, uint8_t day, uint8_t hour);
void read_start_time_ch1(uint8_t *day, uint8_t *hour, uint8_t *min, uint8_t *sec, uint32_t *ns);
void read_end_time_ch1(uint8_t *day, uint8_t *hour, uint8_t *min, uint8_t *sec, uint32_t *ns);
void read_start_time_ch2(uint8_t *day, uint8_t *hour, uint8_t *min, uint8_t *sec, uint32_t *ns);
void read_end_time_ch2(uint8_t *day, uint8_t *hour, uint8_t *min, uint8_t *sec, uint32_t *ns);

#endif // #ifndef _SENSE_NODE
